<html>
<head>
	<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>		
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript">
function showRSS(str)
{
if (str.length==0)
  {
  document.getElementById("rssOutput").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("rssOutput").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","getrss2.php?q="+str,true);
xmlhttp.send();
}

	function recreateDB() {
		$.post('recreateDB.php', function(response) {
			$('#result').html(response);
		});	
	}

</script>
</head>
<body>

	<form>
		<div>
			<input type="button" onclick="recreateDB();" value="Recreate DB"/>
			<div id="result"></div>
		</div>
		
		<div>
		<select onchange="showRSS(this.value)">
			<option value="">Select an RSS-feed:</option>
			<option value="Google">Google News</option>
			<option value="MSNBC">MSNBC News</option>
			<option value="Newsit">NewsIt</option>
		</select>
		</div>
	</form>
	<br />
	<div id="rssOutput">RSS-feed will be listed here...</div>
</body>
</html>
